package com.linser.gistools.refactoring.javafx.treeitem;

import com.linser.gistools.refactoring.javafx.ResourcesOnlineType;
import javafx.scene.Node;
import javafx.scene.control.TreeItem;

/**
 * @author: linser
 * @Desc: 在线资源类型的 OnlineResourcesTreeItem
 * @create: 2024-01-24
 */
public class OnlineResourcesTreeItem extends TreeItem<String> {
    private ResourcesOnlineType resourcesType;

    private String url;

    public OnlineResourcesTreeItem() {
        super();
    }

    public OnlineResourcesTreeItem(String value) {
        super(value);
    }

    public OnlineResourcesTreeItem(String value, final Node graphic) {
        super(value,graphic);
    }

    //重写叶子方法，如果该文件不是目录，则返回真
//    @Override
//    public boolean isLeaf() {
//
//        return this.treeItemFile.isFile();
//    }

    public String getUrl(){
        return this.url;
    }
    public String getResourcesType(){
        return this.resourcesType.toString();
    }
    public void setUrl(String url){
        this.url = url;
    }
    public void setResourcesType(ResourcesOnlineType resourcesType){
        this.resourcesType = resourcesType;
    }
}

